package #(entityPackageName);

import #(dtoPk).#(dtoEntity);
import #(packageConfig.entityPackage).#(table.buildEntityClassName());

import org.mapstruct.InheritConfiguration;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;
/**
 * #(table.getComment()) 转换层。
 *
 * @author #(javadocConfig.getAuthor())
 * @since #(javadocConfig.getSince())
 */
@Mapper
public interface #(entityClassName) {

    #(entityClassName) INSTANCE = Mappers.getMapper(#(entityClassName).class);

    @InheritConfiguration
    #(dtoEntity) toDTO(#(table.buildEntityClassName()) data);

    @InheritConfiguration
    List<#(dtoEntity)> toDTOList(List<#(table.buildEntityClassName())> rows);

    @InheritConfiguration
    #(table.buildEntityClassName()) toEntity(#(dtoEntity) data);
}
